package com.clickpaas.timelineofUN.common.Response;

import lombok.ToString;

@ToString
public enum CommonCode implements ResultCode {

    //成功返回数据
    SUCCESS(200, "success"),
    FAIL(500, "登陆用户在后台没有查询到数据，请检查是否有权限或者是否有对应的数据可供查询！"),
    AUTHFAIL(401, "tokenId认证失败,无权限");
    final Integer code;
    final String message;

    CommonCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}